package com.felix.load;

/**
 * DeadLoopClass
 *
 * @author xuejinhua
 * @date 2018/10/30 9:36
 */
public class DeadLoopClass{

    static class DeadLoopClass1 {

        static {
            if (true) {
                System.out.println(Thread.currentThread() + "init DeadLoopClass");
                while (true) {

                }
            }
        }
    }

    public static void main(String[] args) {
        Runnable script = new Runnable() {
            @Override
            public void run() {
                System.out.println(Thread.currentThread() + "start");
                DeadLoopClass1 deadLoopClass = new DeadLoopClass1();
                System.out.println(Thread.currentThread() + "run over");
            }
        };
        Thread thread1 = new Thread(script);
        Thread thread2 = new Thread(script);
        thread1.start();
        thread2.start();
    }
}
